//package com;
//
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.SQLException;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.apache.logging.log4j.LogManager;
//import org.apache.logging.log4j.Logger;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.linkstec.datasource.DataSourceUtil;
//
//@RestController
//@SpringBootApplication
//public class HelloWorldOutController {
//	
//    @Value("${redis.hostAndPort}")
//	private String hostAndPort;
//    @Value("${redis.redisPassWord}")
//	private String redisPassWord;
//    
//	private static String hostsAndPorts;
//	
//	@Value("${mongo.hostsAndPorts}")
//	public void setHostsAndPorts(String inHostsAndPorts) {
//		hostsAndPorts = inHostsAndPorts;
//	}
//	
//	private static String userNameDatabasePassword;
//	
//	@Value("${mongo.userNameDatabasePassword}")
//	public void setUserNameDatabasePassword(String inUserNameDatabasePassword) {
//		userNameDatabasePassword = inUserNameDatabasePassword;
//	}
//
//	private static final Logger logger = LogManager.getLogger();
//	@RequestMapping("/helloOut")
//    public String index(HttpServletRequest request) {
//		String username=request.getParameter("username");
//        String password=request.getParameter("password");
//        System.out.println("username is:"+username);
//        System.out.println("password is:"+password);
//        logger.info(username + password);
//        logger.info("配置内容是："+ hostAndPort + redisPassWord + hostsAndPorts + userNameDatabasePassword);
//        return "Hello World" + username + "配置内容是："+ hostAndPort + redisPassWord + hostsAndPorts + userNameDatabasePassword;
//    }
//	public static void main(String[] args) {
//        SpringApplication.run(HelloWorldOutController.class, args);
////		String selectSql = "select * from tb_emp1";
////		String insertSql = "insert tb_emp1 values(11,'张三',123,12.12)";
////		String insertSql = "insert customers values(11,'张三','上海')";
//		String updateSql = "update tb_emp1 set salary = salary +1";
//		Connection conn =  DataSourceUtil.getConnection("mysql_datasource");
//		
////		Context context;
////		Connection conn2 =  BatchContext.getNewConnection("mysql_datasource");
//		PreparedStatement ps = null;
//		try {
//			conn.setAutoCommit(false);
//			ps = conn.prepareStatement(updateSql);
//			ps.executeUpdate();
//			conn.commit();
//			conn.close();
//		} catch (SQLException e) {
//			e.printStackTrace();
//		} finally {
//			try {
//				ps.close();
//				conn.close();
//			} catch (SQLException e) {
//				e.printStackTrace();
//			}
//			ps = null;
//			conn = null;
//		}
//    }
//}
